package com.dingding.order.facade.common.rule;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.dingding.order.common.dto.rule.ReqValuationRule;
import com.dingding.order.common.dto.rule.ReqValuationRuleByVehicleId;
import com.dingding.order.common.dto.rule.ResValuationRule;
import com.dingding.order.core.common.rule.service.IValuationRuleService;

/**
 * 
 * @ClassName: ValuationRuleFacadeImpl 
 * @Description: 计价规则服务接口实现类
 * @author YHQ
 * @date 2016年12月7日 下午2:46:16
 * @since V2.5.7
 * 
 */
@Component("valuationRuleFacade")
public class ValuationRuleFacadeImpl implements IValuationRuleFacade{

	@Resource(name = "valuationRuleService")
	private IValuationRuleService valuationRuleService;
	
	/**
	 * 
	 * @Title: getChargeRuleList 
	 * @Description: 根据城市Id获取该城市的每个有效车型的计价规则 
	 * @param reqValuationRule 客户端请求参数
	 * @author YHQ 
	 * @since V2.5.7
	 * @return List<ResValuationRule>    返回类型
	 * 
	 */
	@Override
	public List<ResValuationRule> getChargeRuleList(ReqValuationRule reqValuationRule) {
		
		return valuationRuleService.getChargeRuleList(reqValuationRule);
	}

	/**
	 * 
	 * @Title: getChargeRuleByVehicleLevelId 
	 * @Description: 根据车辆Id获取车辆计价规则
	 * @param reqValuationRuleByVehicleId 客户端请求参数
	 * @author YHQ 
	 * @since V2.5.7
	 * @return ResValuationRule    返回类型
	 * 
	 */
	@Override
	public ResValuationRule getChargeRuleByVehicleLevelId(ReqValuationRuleByVehicleId reqValuationRuleByVehicleId) {
		
		return valuationRuleService.getChargeRuleByVehicleLevelId(reqValuationRuleByVehicleId);
	}

}
